package cn.zhouchao.org.domain;

import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.zhouchao.basic.domain.BaseDomain;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.List;

/**
 * <p>
 * 
 * </p>
 *
 * @author zhouchao
 * @since 2023-02-28
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class Shop extends BaseDomain{
    @Excel(name = "店铺名称", orderNum = "1", width = 30, importFormat = "true_st")
    private String name;
    @Excel(name = "电话号", orderNum = "2", width = 30, importFormat = "true_st")
    private String tel;

    @Excel(name = "入驻时间", orderNum = "3", width = 30, importFormat = "true_st")
    private Date registerTime;
    /**
     * 店铺状态：0待审核，1审核通过，2待激活，3驳回
     */
    @Excel(name = "店铺状态", replace = {"待审核_0","审核通过_1","待激活_2","驳回_3"}, orderNum = "4", width = 30, importFormat = "true_st")
    private Integer state;
    @Excel(name = "店铺地址", orderNum = "5", width = 30, importFormat = "true_st")
    private String address;
    @Excel(name = "店铺logo", orderNum = "6", width = 30, importFormat = "true_st")
    private String logo;
    //
    private Long adminId;
    private Employee employee;
    private List<ShopAuditLog> auditLogs;
//@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")

    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    public Date getRegisterTime() {
        return registerTime;
    }
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    public void setRegisterTime(Date registerTime) {
        this.registerTime = registerTime;
    }
}
